<template>
<div>
    <div class="swiper-container">
        <div class="swiper-wrapper">
            <div class="swiper-slide"><img src="../../static/image/banner1.jpg" alt=""></div>
            <div class="swiper-slide"><img src="../../static/image/banner2.jpg" alt=""></div>
            <div class="swiper-slide"><img src="../../static/image/banner3.jpg" alt=""></div>
        </div>
        <div class="swiper-button-next"></div>
        <div class="swiper-button-prev"></div>
    </div>
</div>

</template>
<style lang="less">
        .swiper-container {
        width: 100%;
        height: 100%;
      }
      .swiper-slide {
        text-align: center;
        font-size: 18px;
        background: #fff;
        /* Center slide text vertically */
        display: -webkit-box;
        display: -ms-flexbox;
        display: -webkit-flex;
        display: flex;
        -webkit-box-pack: center;
        -ms-flex-pack: center;
        -webkit-justify-content: center;
        justify-content: center;
        -webkit-box-align: center;
        -ms-flex-align: center;
        -webkit-align-items: center;
        align-items: center;
        &>img{
            width: 100%;
            height: 450px;
        }
      }
      
      .swiper-button-prev{
        background-image: url('../static/image/prev.png');
        left: 10px;
        right: auto;
    }
    .swiper-button-next{
        background-image: url('../static/image/next.png');
        right: 10px;
        left: auto;
    }
</style>
<script>
    //import Swiper from 'swiper';
    //import 'static/css/swiper.min.css';
    export default {
        props: ['listImg'],
        mounted() {
            console.log('mounted', this)
            var swiper = new Swiper('.swiper-container', {
                pagination: '.swiper-pagination',
                paginationClickable: true,
                loop: true,
                speed: 600,
                autoplay: 4000,
                onTouchEnd: function() {
                    swiper.startAutoplay()
                }
            });
        }
    }
</script>